package ModelLayer;

import java.util.ArrayList;

/**
 * 
 * @author DM79 group 5
 * @version 2012.13.12
 */

public class Offer {
	//instance variables
	private String idOffer;
	private double calculatedPrice;
	private String dateStart;
	private String dateEnd;
	private String acceptDeadline;
	private double discount;
	private String statusOffer;
	private String sentDate;
	private double pricePerHour;

    //association to Order
    private Order order;

    //association to Customer
    private Customer customer;

    //association to PartialAssignment
    private ArrayList<PartialAssignment> partialAssignmentList;

	//constructors
    public Offer() {    	
    }

    public Offer(String idoffer){
        this.idOffer = idoffer;
    }

	public Offer(Order order, Customer customer) {
	    this.order = order;
        this.customer = customer;
        partialAssignmentList = new ArrayList<PartialAssignment>();
	}
	
	public Offer(String idOffer, Order order, Customer customer) {
		this.idOffer = idOffer;
        this.order = order;
        this.customer = customer;
        partialAssignmentList = new ArrayList<PartialAssignment>();
	}
	
	public Offer(String idOffer,double calculatedPrice,String dateStart,String dateEnd,String acceptDeadline,
		double discount,String statusOffer,String sentDate,double pricePerHour, Order order, Customer customer) {
		this.idOffer = idOffer;
		this.calculatedPrice = calculatedPrice;
		this.dateStart = dateStart;
		this.dateEnd = dateEnd;
		this.acceptDeadline = acceptDeadline;
		this.discount = discount;
		this.statusOffer = statusOffer;
		this.sentDate = sentDate;
		this.pricePerHour = pricePerHour;
        this.order = order;
        this.customer = customer;
        partialAssignmentList = new ArrayList<PartialAssignment>();
	}

    /**
     * getters
     */

	/**
	 * @return the idOffer
	 */
	public String getIdOffer() {
		return idOffer;
	}

	/**
	 * @return the calculatedPrice
	 */
	public double getCalculatedPrice() {
		return calculatedPrice;
	}

	/**
	 * @return the dateStart
	 */
	public String getDateStart() {
		return dateStart;
	}

	/**
	 * @return the dateEnd
	 */
	public String getDateEnd() {
		return dateEnd;
	}

	/**
	 * @return the acceptDeadline
	 */
	public String getAcceptDeadline() {
		return acceptDeadline;
	}

	/**
	 * @return the discount
	 */
	public double getDiscount() {
		return discount;
	}

	/**
	 * @return the statusOffer
	 */
	public String getStatusOffer() {
		return statusOffer;
	}

	/**
	 * @return the sentDate
	 */
	public String getSentDate() {
		return sentDate;
	}

	/**
	 * @return the pricePerHour
	 */
	public double getPricePerHour() {
		return pricePerHour;
	}

	/**
	 * @return the object Order stored in order
	 */
    public Order getOrder() {
        return order;
    }

    /**
     * @return the ArrayList of objects partialAssignment
     */
    public ArrayList<PartialAssignment> getPartialAssignmentList() {
        return partialAssignmentList;
    }

    /**
     * @return the object Customer stored in customer
     */
    public Customer getCustomer() {
        return customer;
    }

    /**
     * setters
     */

	/**
	 * @param idOffer the idOffer to set
	 */
	public void setIdOffer(String idOffer) {
		this.idOffer = idOffer;
	}

	/**
	 * @param calculatedPrice the calculatedPrice to set
	 */
	public void setCalculatedPrice(double calculatedPrice) {
		this.calculatedPrice = calculatedPrice;
	}

	/**
	 * @param dateStart the dateStart to set
	 */
	public void setDateStart(String dateStart) {
		this.dateStart = dateStart;
	}

	/**
	 * @param dateEnd the dateEnd to set
	 */
	public void setDateEnd(String dateEnd) {
		this.dateEnd = dateEnd;
	}

	/**
	 * @param acceptDeadline the acceptDeadline to set
	 */
	public void setAcceptDeadline(String acceptDeadline) {
		this.acceptDeadline = acceptDeadline;
	}

	/**
	 * @param discount the discount to set
	 */
	public void setDiscount(double discount) {
		this.discount = discount;
	}

	/**
	 * @param statusOffer the statusOffer to set
	 */
	public void setStatusOffer(String statusOffer) {
		this.statusOffer = statusOffer;
	}

	/**
	 * @param sentDate the sentDate to set
	 */
	public void setSentDate(String sentDate) {
		this.sentDate = sentDate;
	}

	/**
	 * @param pricePerHour the pricePerHour to set
	 */
	public void setPricePerHour(double pricePerHour) {
		this.pricePerHour = pricePerHour;
	}

	/**
	 * @param order the object Order to set in order
	 */
    public void setOrder(Order order) {
        this.order = order;
    }

    /**
     * @param partialAssignmentList the ArrayList of objects partialAssignment
     */
    public void setPartialAssignmentList(ArrayList<PartialAssignment> partialAssignmentList) {
        this.partialAssignmentList = partialAssignmentList;
    }

    /**
     * @param customer the object Customer to set in customer
     */
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }
}
